<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('ad/index')}">{:L('ADMIN_AD_INDEX')}</a></li>
			<li><a href="{:U('ad/add')}">添加推送</a></li>
		</ul>
		<form method="post" class="js-ajax-form">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('ad/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('ad/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDE')}</button>
			</div>
			<php> $status=array("1"=>L('DISPLAY'),"0"=>L('HIDDEN')); </php>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">ID</th>
						<th>预约内容</th>
						<th>活动名称</th>
						<th>温馨提示</th>
						<th>预计总数</th>
						<th>已发送数量</th>
						<th>成功数量</th>
						<th>错误码</th>
						<th>状态</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="ads" item="vo">
					<tr>
						<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.ad_id}"></td>
						<td>{$vo.ad_id}</td>
						<td>{$vo.content}</td>
						<td>{$vo.ad_name}</td>
						<td>{$vo.tip_message}</td>
						<td>{$vo.total_num}</td>
						<td>{$vo.send_num}</td>
						<td>{$vo.success_num}</td>
						<td>{$vo.err_code}</td>
						<td>{$vo.status_info}</td>
						<td>{$vo.add_time}</td>
						<td>{$vo.update_time}</td>
						<td>
							<if condition="$vo.status != 2" >
								<a href="{:U('ad/task_stop',array('id'=>$vo['ad_id']))}" class="js-ajax-delete">暂停</a>
								<a href="{:U('ad/task_start',array('id'=>$vo['ad_id']))}" class="js-ajax-delete">启动</a>
								<a href="{:U('ad/task_finish',array('id'=>$vo['ad_id']))}" class="js-ajax-delete">终止</a>
							</if>

						</td>
					</tr>
					</foreach>
				</tbody>
				<tfoot>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">ID</th>
						<th>预约内容</th>
						<th>活动名称</th>
						<th>温馨提示</th>
						<th>预计总数</th>
						<th>已发送数量</th>
						<th>成功数量</th>
						<th>错误码</th>
						<th>状态</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</tfoot>
			</table>
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('ad/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('ad/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDE')}</button>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>